import request from '@/utils/request'

// 查询商品分类列表
export function listCategory(brandId) {
  return request({
    url: '/super/category/listcommen/'+ brandId,
    method: 'get',
  })
}

// 查询商品分类详细
export function getCategory(categoryId) {
  return request({
    url: '/super/category/' + categoryId,
    method: 'get'
  })
}

// 新增商品分类
export function addCategory(data) {
  return request({
    url: '/super/category/addCommonCategory',
    method: 'post',
    data: data
  })
}

export function addHouseCategory(data) {
  return request({
    url: '/super/category/addHouseCategory',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateCategory(data) {
  return request({
    url: '/super/category/editCategory',
    method: 'put',
    data: data
  })
}



// 删除商品分类
export function delCategory(categoryId) {
  return request({
    url: '/super/category/deleteCate/' + categoryId,
    method: 'delete'
  })
}

// 导出商品分类
export function exportCategory(query) {
  return request({
    url: '/system/category/export',
    method: 'get',
    params: query
  })
}



export function CommenOne() {
  return request({
    url: '/super/category/findAllCommenOne',
    method: 'get',
    params: ""
  })
}


export function CommenOneZi(parentId) {
  return request({
    url: '/super/category/findAllCommenOneZi/' +parentId,
    method: 'get'
  })
}



export function listHouse(query) {
  return request({
    url: '/super/category/listHouse',
    method: 'get',
    params: query
  })
}

export function CommenTwo() {
  return request({
    url: '/super/category/findAllCommenTwo',
    method: 'get',
    params: ""
  })
}


export function CommenTwoZi(parentId) {
  return request({
    url: '/super/category/findAllCommenTwoZi/' +parentId,
    method: 'get'
  })
}



